<div class="list-div" id="listDiv">
<table width="100%" cellpadding="3" cellspacing="1" id="listTable">
  <tr>
    <th>排序</th>
    <th>ID</th>
    <th>名称</th>
    <th>打开窗口</th>
    <th>类型</th>
    <th>管理操作</th>
  </tr>
{loop $result $k $v}
  <tr>
    <td class="first-cell"><span class="editorder" id="o$v['menuid']">$v['listorder']</span></td>
    <td align="center">$v['menuid']</td>
    <td class="first-cell"><span class="editname" id="m$v['menuid']">$v['name']</span></td>
    <td align="center">$v['target']</td>
    <td align="center"><!--{if ($v['isdir']==1) }-->目录<!--{else}-->链接<!--{/if}--></td>
    <td align="center">
      <a href="/menu/add/parentid/$v['menuid']/parentname/$v['name']/"><img src="/images/manage/new.gif" alt="添加子菜单" title="添加子菜单"/></a> |
      <!--{if ($v['isfolder']==1) }--><a href='/menu/index/parentid/$v['menuid']/parentname/$v['name']/'><img src="/images/manage/content.gif" alt="子菜单" title="子菜单"/></a><!--{else}--><img class="grey" src="/images/manage/content.gif" alt="子菜单" title="子菜单"/><!--{/if}--> |
      <a href="/menu/edit/menuid/$v['menuid']/"><img src="/images/manage/edit.gif" alt="修改" title="修改"/></a> |
      <a class="confirm" id="d$v['menuid']" href="void(0);"><img src="/images/manage/del.gif" alt="删除" title="删除"/></a>
    </td>
  </tr>
{/loop}
  </table>
<script type="text/javascript" language="javascript"> 
	$('.editname').editable('/menu/saveajax/type/name/', {
		indicator : '保存...', tooltip   : '点击修改...', onblur    : 'submit' 
	});
    $('.editorder').editable('/menu/saveajax/type/order/', {
        indicator : '保存...', tooltip   : '点击修改...', onblur    : 'submit' 
    });
    $('.confirm').click(function() {
        function deltr(result){
            if (result!='')
            {
                $('#'+result).parent().parent().remove();
            }
        }
        var del_id = $(this).attr('id');
        del_id = del_id.substr(1);
    	$.ajax({
            url: "/menu/delajax/menuid/"+del_id+"/",
            cache: false, success: deltr
        });
	    return false;
	});
	$('.confirm').confirm({
		msg:'你确认吗？', timeout:3000, buttons: { ok:'确定', cancel:'取消' }
	});
    var add_url = '/menu/add/parentid/$parentid/parentname/$parentname/';
</script>

<!--      
    <tr>
      <td align="right" nowrap="true" colspan="6">
            <div id="turn-page">
        总计  <span id="totalRecords">9</span>
        个记录分为 <span id="totalPages">1</span>
        页当前第 <span id="pageCurrent">1</span>
        页，每页 <input type='text' size='3' id='pageSize' value="15" onkeypress="return listTable.changePageSize(event)" />
        <span id="page-link">
          <a href="javascript:listTable.gotoPageFirst()">第一页</a>
          <a href="javascript:listTable.gotoPagePrev()">上一页</a>
          <a href="javascript:listTable.gotoPageNext()">下一页</a>
          <a href="javascript:listTable.gotoPageLast()">最末页</a>
          <select id="gotoPage" onchange="listTable.gotoPage(this.value)">
            <option value='1'>1</option>          </select>
        </span>
      </div>
      </td>
    </tr>
-->
</div>
